﻿using System;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using YJKBuildingProfile.YJKBuildingProfile.Forms;
using YJKRevitView;

namespace YJKBuildingProfile.YJKBuildingProfile
{
	[Transaction(TransactionMode.Manual)]
	[Regeneration(RegenerationOption.Manual)]
	public class CmdLineStyleSetting : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			CmdViewType types = (CmdViewType)111;
			if (SwitchView.SetUsableView(types, commandData) != Autodesk.Revit.UI.Result.Succeeded)
			{
				return Autodesk.Revit.UI.Result.Failed;
			}
			new SettingForm(commandData.Application.ActiveUIDocument.Document).ShowDialog();
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
